<template>
  <div class="siteInfoHtmlPoint">
    <div class="title">{{ SiteInfo.customName }}</div>
    <div class="close" @click="$emit('close')">
      <jo-icon name="jo-Close" :size="16" />
    </div>
    <div class="form">
      <div class="detail-info">
        <div class="flex-start">
          <div class="name">经度：</div>
          <div class="value">{{ SiteInfo.longitude }}</div>
        </div>
        <div class="flex-start">
          <div class="name">纬度：</div>
          <div class="value">{{ SiteInfo.latitude }}</div>
        </div>
        <div class="flex-start">
          <div class="name">高度：</div>
          <div class="value">{{ SiteInfo.height }}</div>
        </div>
      </div>
      <div class="handle"></div>
    </div>
  </div>
</template>
<script setup lang="ts">
const props = withDefaults(
  defineProps<{
    SiteInfo: any;
  }>(),
  {
    SiteInfo: () => ({
      longitude: 0,
      latitude: 0,
      height: 0,
    }),
  }
);
</script>
<style scoped lang="scss">
:root {
  --jo-primary-9: rgba(3, 27, 28, 0.4);
}
.siteInfoHtmlPoint {
  background: rgba(16, 68, 146, 0.4);
  &::after {
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 0;
    content: "";
    transform: translateX(-50%) rotate(45deg);
    border-left: 15px solid transparent;
    border-top: 15px solid transparent;
    border-right: 15px solid var(--jo-primary-9);
  }
  .close {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #fff;
    cursor: pointer;
  }

  z-index: 1500;
  align-items: center;
  width: 430px;
  padding: 10px 15px;
  background: var(--jo-primary-9);
  border-radius: 10px;
  flex-direction: column;
  .title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    margin-bottom: 15px;
    font-size: 22px;
    text-align: left;
    color: #fff;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.3em;
    flex-direction: row;
  }
  .form {
    .detail-info {
      display: grid;
      width: 100%;
      grid-template-columns: repeat(2, 50%);
      grid-template-rows: auto;
      gap: 10px 10px;
      .flex-start {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        .name {
          width: 110px;
          padding: 6px;
          font-size: 14px;
          font-family: "HarmonyOS Sans SC";
          text-align: left;
          color: #8fc3f6;
          background-size: 100% 100%;
          box-sizing: border-box;
          //   background-image: url("@/assets/imgs/dashboardHome/bg-card.png");
          font-weight: 400;
          line-height: 16px;
        }
        .value {
          font-size: 14px;
          color: #fff;
          font-weight: 400;
        }
      }
    }
    .handle {
      display: flex;
      justify-content: flex-end;
    }
  }
}
</style>
